package gugga.tasks
{
	import flash.events.IEventDispatcher;
	
	[Event(name="start", type="TaskEvent")]
	[Event(name="interrupted", type="TaskEvent")]
	[Event(name="completed", type="TaskEvent")]
	
	public interface ITask extends IEventDispatcher
	{
		function start() : void;
		
		function isRunning() : Boolean;
		
		/**
		 * @return true if interuption comlete synchronously 
		 * and the task will not dispatch "interuptionCompleted" event
		 * otherwise false
		 */
		function isImmediatelyInterruptable() : Boolean;
		function interrupt() : void;
	}
}